Skip to content

optee-utee: support no-std net.#164

Merged
DemesneGH merged 2 commits intoapache:mainfrom
ivila:feat_noStdNet_zc
Feb 7, 2025
Merged

optee-utee: support no-std net.#164
DemesneGH merged 2 commits intoapache:mainfrom
ivila:feat_noStdNet_zc

Conversation

@ivila
Copy link
Copy Markdown
Contributor

@ivila ivila commented Jan 20, 2025

  1. make optee_utee::net::{TcpStream, UdpSocket} support no-std
  2. update tcp_client-rs and udp_socket-rs to support running at no-std

Fixes #162

@ivila ivila force-pushed the feat_noStdNet_zc branch 2 times, most recently from b7c5ef7 to c2ac250 Compare January 21, 2025 08:23
Copy link
Copy Markdown
Contributor

@DemesneGH DemesneGH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally, please also update the no-std part in: https://github.com/apache/incubator-teaclave-trustzone-sdk?tab=readme-ov-file#supported-examples

Except for these small recommendations, the PR looks great to me. Feel free to add the tag once they’re addressed. Thanks!

Reviewed-by: Yuan Zhuang <yuanz@apache.org>

@ivila ivila force-pushed the feat_noStdNet_zc branch 2 times, most recently from c18b1cc to eb36c29 Compare January 23, 2025 06:02
@ivila ivila force-pushed the feat_noStdNet_zc branch 2 times, most recently from a9e722b to de920c6 Compare January 26, 2025 02:31
@ivila
Copy link
Copy Markdown
Contributor Author

ivila commented Jan 26, 2025

Force update for ipv6 test and some comments. There are some more changes in those files:

  1. ci/ci.sh: move tcp_client-rs and udp_client-rs out of STD only.
  2. tests/optee-qemuv8.sh: Enable the network, no matter the environment.
  3. examples/tcp_client-rs: add ipv6 test.
  4. examples/udp_client-rs: add ipv6 test.

@ivila ivila requested review from DemesneGH and b49020 January 26, 2025 02:37
@ivila
Copy link
Copy Markdown
Contributor Author

ivila commented Feb 7, 2025

@DemesneGH @b49020 Any updates

@b49020
Copy link
Copy Markdown
Contributor

b49020 commented Feb 7, 2025

There is CI failure related to 64-bit std TAs, you should be able to look into it. However, FWIW:

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>

@ivila
Copy link
Copy Markdown
Contributor Author

ivila commented Feb 7, 2025

There is CI failure related to 64-bit std TAs, you should be able to look into it. However, FWIW:

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>

The error is error: failed to get bitcode from object file for LTO (could not find requested section)
image
It happens occasionally; simply retry, and the test will eventually pass.

PS: the CI is passed at my repositories, check here:
image

@b49020
Copy link
Copy Markdown
Contributor

b49020 commented Feb 7, 2025

It happens occasionally; simply retry, and the test will eventually pass.

Okay, looks like it's related to custom OP-TEE toolchain target OS config option for std TAs. @DemesneGH can you take a look at this issue? We should be able to merge this PR while filing a corresponding issue such that we can keep track of it.

ivila added 2 commits February 7, 2025 14:30
- introduce the Socket struct for performing socket operations within TEE.
- introduce the SocketAdapter trait to support various implementations of the
  GP TEE Sockets API.
- introduce a predefined optee module for TCP and UDP support in OP-TEE
  compatible TEE OS.

Signed-off-by: ivila <390810839@qq.com>
Reviewed-by: Yuan Zhuang <yuanz@apache.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
- add ipv6 call in tcp_client-rs and udp_socket-rs
- enable no_std run of tcp_client-rs and udp_socket-rs in ci

Signed-off-by: ivila <390810839@qq.com>
Reviewed-by: Yuan Zhuang <yuanz@apache.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
@ivila
Copy link
Copy Markdown
Contributor Author

ivila commented Feb 7, 2025

Can we retry the failed test? I think it’s simply a lag that causes digest-rs to exceed the 5-second limit, resulting in a Ctrl-C (signal 2).

All the tests in the CI passed on my repository, check here
image

@DemesneGH DemesneGH merged commit 3fcbb3e into apache:main Feb 7, 2025
@DemesneGH
Copy link
Copy Markdown
Contributor

It happens occasionally; simply retry, and the test will eventually pass.

Okay, looks like it's related to custom OP-TEE toolchain target OS config option for std TAs. @DemesneGH can you take a look at this issue? We should be able to merge this PR while filing a corresponding issue such that we can keep track of it.

This PR is merged and a new issue is created. #166

@ivila ivila deleted the feat_noStdNet_zc branch February 7, 2025 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: optee-utee: support no-std net.

3 participants